<template>
	<!-- title部分 -->
	<view class="title">
		<view class="title_leftbox" @click="goToGendandating">
			<image class="title_leftbox_image_fanhui" src="../../static/返回.png"></image>
		</view>
		<view class="title_middlebox">
			<view class="title_middlebox_text">我的战绩</view>
		</view>
		<view class="title_rightbox">
			<view class="title_rightbox_text"></view>
		</view>
	</view>

	<!--匿名用户部分 -->
	<view class="nimingyonghubox">
		<image class="nimingyonghubox_img" src="../../static/geren.png"></image>

		<view class="nimingyonghubox_textbox">
			<view class="nimingyonghubox_textbox1">匿名用户</view>
			<view class="nimingyonghubox_textbox_textbox2">
				<view class="nimingyonghubox_textbox_textbox2_text">粉丝：0人</view>
				<view class="nimingyonghubox_textbox_textbox2_text">关注：0人</view>
			</view>
		</view>
	</view>

	<!-- 我的战绩部分 -->

	<view class="zhanji">
		<view class="zhanji_text">我的战绩</view>

		<view class="zhanjibox_textbox">
			<view class="zhanjibox_textbox_nrbox">
				<view class="zhanjibox_textbox_nrbox_text1">0元</view>
				<view class="zhanjibox_textbox_nrbox_text2">累计中奖</view>
			</view>
			<view class="zhanjibox_textbox_nrbox">
				<view class="zhanjibox_textbox_nrbox_text1">0%</view>
				<view class="zhanjibox_textbox_nrbox_text2">7日盈利</view>
			</view>
			<view class="zhanjibox_textbox_nrbox">
				<view class="zhanjibox_textbox_nrbox_text1">0中0</view>
				<view class="zhanjibox_textbox_nrbox_text2">7日命中</view>
			</view>
			<view class="zhanjibox_textbox_nrbox">
				<view class="zhanjibox_textbox_nrbox_text1">0</view>
				<view class="zhanjibox_textbox_nrbox_text2">带红人数</view>
			</view>
		</view>

		<view class="jinwuqibox">
			<view class="jinwuqibox_text">近五期</view>
			<view class="jinwuqibox_hezi"></view>
			<view class="jinwuqibox_hezi"></view>
			<view class="jinwuqibox_hezi"></view>
			<view class="jinwuqibox_hezi"></view>
			<view class="jinwuqibox_hezi"></view>
		</view>
	</view>

	<!-- tab部分 -->
	<view class="tabbox">
		<view class="tabbox_text" v-for="(tab, index) in tabs" :key="index" :class="{ 'active': subCurrent === index }"
			@click="subChecked(index)">
			{{ tab }}
		</view>
	</view>

	<!-- xuanhao部分 -->
	<view v-if="subCurrent === 0" class="content">
		<view class="zhanwubox">
			<image class="zhanwubox_img" src="../../static/biaoqing.png"></image>
			<view class="zhanwubox_text">你还没有跟单记录哦</view>
			<view class="zhanwubox_text2" @click="goToGendandating">立即跟单</view>
		</view>
	</view>

	<view v-if="subCurrent === 1" class="content">
		<view class="zhanwubox">
			<image class="zhanwubox_img" src="../../static/biaoqing.png"></image>
			<view class="zhanwubox_text">你还没有发单记录哦</view>
			<view class="zhanwubox_text2" @click="goToJingcaizuqiu">立即发单</view>
		</view>
	</view>
	<view v-if="subCurrent === 2" class="content">
		<view class="zhanwubox">
			<image class="zhanwubox_img" src="../../static/biaoqing.png"></image>
			<view class="zhanwubox_text">你还没有定制他人哦</view>
			<view class="zhanwubox_text2" @click="goToDingzhi">定制跟单</view>
		</view>

	</view>
	<view v-if="subCurrent === 3" class="content">
		<view class="zhanwubox">
			<image class="zhanwubox_img" src="../../static/biaoqing.png"></image>
			<view class="zhanwubox_text">还没有人定制你的方案哦</view>
			<view class="zhanwubox_text3">没人定制</view>
			
		</view>

	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				subCurrent: 0, // 默认选中第一个子tab
				tabs: ['我的跟单', '我的方案', '我的定制', '定制我的'],
			}
		},
		methods: {
			subChecked(index) {
				this.subCurrent = index;
			},
			goToGendandating() {
				uni.switchTab({
						url: '/pages/gendan/gendan', // 跟单路径
					});
			},
			goToJingcaizuqiu() {
				// 使用uni-app的navigateTo方法跳转
				uni.navigateTo({
					url: '/pages/jingcaizuqiu/jingcaizuqiu'
				});
			},
			goToDingzhi() {
				// 使用uni-app的navigateTo方法跳转
				uni.navigateTo({
					url: '/pages/dingzhi/dingzhi'
				});
			},
			
		}
	}
</script>

<style>
	page {
		background-color: #eeeeee;
	}

	/* 以下是title部分样式 */
	.title {
		background-color: rgb(226, 50, 52);
		display: flex;
		align-items: center;
		justify-content: space-between;
		/* 使左右盒子分别位于两侧 */
		padding: 2%;
	}

	.title_leftbox {
		display: flex;
		align-items: center;
		justify-content: center;
		/* 使图标居中 */
	}

	.title_leftbox_image_fanhui {
		width: 20px;
		height: 25px;
	}

	.title_middlebox {
		flex-grow: 1;
		/* 使中间盒子占据剩余空间 */
		display: flex;
		align-items: center;
		justify-content: center;
		/* 使文本居中 */
	}

	.title_middlebox_text {
		font-size: 15px;
		color: white;
		font-weight: 700;
	}

	.title_rightbox {
		display: flex;
		align-items: center;
		justify-content: center;
		/* 使文本居中 */
	}

	.title_rightbox_text {
		font-size: 15px;
		color: white;
	}

	/* 匿名用户部分 */
	.nimingyonghubox {
		padding: 4% 6%;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #eeeeee;
		background: white;
	}

	.nimingyonghubox_img {
		width: 33px;
		height: 33px;
		display: block;
		margin-right: 5%;
	}

	.nimingyonghubox_textbox {
		padding: 2%;
		/* width: 80%; */
		flex: 1;
	}

	.nimingyonghubox_textbox1 {
		font-size: 14px;
	}

	.nimingyonghubox_textbox_textbox2 {
		display: flex;
		margin-right: 2%;
	}

	.nimingyonghubox_textbox_textbox2_text {
		font-size: 12px;
		/* width: 72%; */
		padding-right: 5%;
		font-weight: 700;
	}

	/* 我的战绩部分 */
	.zhanji {
		padding: 2%;
		margin-bottom: 2%;
		background: white;
	}

	.zhanji_text {
		padding: 2% 0 4% 0;
		font-size: 15px;
		border-bottom: 1px solid #eeeeee;
	}

	.zhanjibox_textbox {
		display: flex;
		align-items: center;
		padding: 2%;
		border-bottom: 1px solid #eeeeee;
	}

	.zhanjibox_textbox_nrbox {
		text-align: center;
		flex: 1;
	}

	.zhanjibox_textbox_nrbox_text1 {
		color: #e23234;
		font-size: 15px;
	}

	.zhanjibox_textbox_nrbox_text2 {
		color: #999999;
		font-size: 15px;
	}

	.jinwuqibox {
		display: flex;
		align-items: center;
		/* border-bottom: 1px solid #eeeeee; */
	}

	.jinwuqibox_text {
		font-size: 15px;
		color: #999999;
		padding: 4%;
	}

	.jinwuqibox_hezi {
		width: 25px;
		height: 25px;
		background: #999999;
		border-radius: 50px;
		margin: 0 auto;
	}

	/* 以下是 tab 部分样式 */

	.tabbox {
		display: flex;
		align-items: center;
		background: white;
		height: 45px;
		font-size: 16px;
	}

	.tabbox_text {
		flex: 1;
		text-align: center;
		cursor: pointer;
	}

	/* tab被选样式 */
	.active {
		position: relative;
		color: #E23234;
		font-weight: bold;
	}

	.active::after {
		content: "";
		position: absolute;
		width: 23px;
		height: 3px;
		background-color: #E23234;
		left: 0;
		right: 0;
		margin: 0px auto;
		top: 28px;
		border-radius: 5px;
	}

	.content {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 30vh;
		background: white;
	}

	.zhanwubox_img {
		    width: 45px;
		    height: 45px;
		    display: block;
		    margin: 0 auto 6%;
	}

	.zhanwubox_text {
		color: rgb(192, 196, 204);
		font-size: 14px;
	}
	.zhanwubox_text2{
		    font-size: 15px;
		    margin: 0 auto;
		    color: #E23234;
		    border: 1px solid #e23234;
		    border-radius: 7px;
		    text-align: center;
		    width: 60%;
		    padding: 3%;
		    margin: 7% auto;
	}
	.zhanwubox_text3{
		 width: 60%;
		   padding: 3%;
		    margin: 7% auto;
			background-color: white;
			color: white;
	}
</style>
